/*
 * cardtest2.c
 * CS362 Assignment 2
 * Hugh McDonald (mcdonalh)
 */
#include "dominion.h"
#include "dominion_helpers.h"
#include <assert.h>
#include <stdio.h>

int main(int argc, char **argv)
{
	struct gameState *testGame = newGame();

	int cards[10] = {adventurer, council_room, feast, gardens, mine,
	       remodel, smithy, steward, baron, great_hall};

	int i, j, k, l, inithand, afterhand, initaction, afteraction;

	printf("cardtest2:\n");
        
    for(i = 2; i < 5; i++){
        initializeGame(i, cards, -1, testGame);
        for(j = 1; j <= i; j++){
            printf("Players: %d, Current: = %d, ", i, j);
            testGame->hand[j - 1][0] = steward;
            initaction = testGame->numActions;
            inithand = testGame->handCount[j];
            l = cardEffect(steward, 1, 2, 3, testGame, 0, 0);
            afterhand = testGame->handCount[j];
            afteraction = testGame->numActions;
            if(l == 0){
                printf("Success");
                    if(inithand == afterhand){
                        printf(" with correct card count\n");
                    } else {
                        printf(" with wrong card count\n");
                    }
                                
            } else {
                printf("Failure\n");
            }
        }                   
    }
    
	return 0;
}